<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Home</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" />
<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>
    <div class="banner">
        
        <h1>
            <span class="type">Class</span>
            Home
            
                <span class="parent">&lt;
                    
                    Object
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../files/lib/home_rb.html">lib/home.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>F</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-finished_orders">finished_orders</a>,
              </li>
            
              
              <li>
                <a href="#method-i-finished_orders_of_yesterday">finished_orders_of_yesterday</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>N</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-c-new">new</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>O</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-orders_amount">orders_amount</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>P</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-pay_pending_orders">pay_pending_orders</a>,
              </li>
            
              
              <li>
                <a href="#method-i-pending_orders">pending_orders</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>U</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-unfinished_orders">unfinished_orders</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    


    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-new">
            
              <b>new</b>(store, date = Time.now)
            
            <a href="../classes/Home.html#method-c-new" name="method-c-new" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
                
              </p>
              <div id="method-c-new_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/home.rb, line 2</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">date</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>)
  <span class="ruby-ivar">@store</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">store</span>
  <span class="ruby-ivar">@date</span> = <span class="ruby-identifier">date</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                  
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-finished_orders">
            
              <b>finished_orders</b>()
            
            <a href="../classes/Home.html#method-i-finished_orders" name="method-i-finished_orders" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-finished_orders_source')" id="l_method-i-finished_orders_source">show</a>
                
              </p>
              <div id="method-i-finished_orders_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/home.rb, line 19</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">finished_orders</span>
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">orders</span>.<span class="ruby-identifier">by_week</span>.<span class="ruby-identifier">complete</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-finished_orders_of_yesterday">
            
              <b>finished_orders_of_yesterday</b>()
            
            <a href="../classes/Home.html#method-i-finished_orders_of_yesterday" name="method-i-finished_orders_of_yesterday" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-finished_orders_of_yesterday_source')" id="l_method-i-finished_orders_of_yesterday_source">show</a>
                
              </p>
              <div id="method-i-finished_orders_of_yesterday_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/home.rb, line 23</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">finished_orders_of_yesterday</span>
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">orders</span>.<span class="ruby-identifier">by_date</span>(<span class="ruby-ivar">@date</span>.<span class="ruby-identifier">yesterday</span>).<span class="ruby-identifier">complete</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-orders_amount">
            
              <b>orders_amount</b>()
            
            <a href="../classes/Home.html#method-i-orders_amount" name="method-i-orders_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-orders_amount_source')" id="l_method-i-orders_amount_source">show</a>
                
              </p>
              <div id="method-i-orders_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/home.rb, line 27</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">orders_amount</span>
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">orders</span>.<span class="ruby-identifier">complete</span>.<span class="ruby-identifier">sum</span>(<span class="ruby-value">:amount</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-pay_pending_orders">
            
              <b>pay_pending_orders</b>()
            
            <a href="../classes/Home.html#method-i-pay_pending_orders" name="method-i-pay_pending_orders" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-pay_pending_orders_source')" id="l_method-i-pay_pending_orders_source">show</a>
                
              </p>
              <div id="method-i-pay_pending_orders_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/home.rb, line 11</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">pay_pending_orders</span>
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">orders</span>.<span class="ruby-identifier">by_week</span>.<span class="ruby-identifier">pay_pending</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-pending_orders">
            
              <b>pending_orders</b>()
            
            <a href="../classes/Home.html#method-i-pending_orders" name="method-i-pending_orders" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-pending_orders_source')" id="l_method-i-pending_orders_source">show</a>
                
              </p>
              <div id="method-i-pending_orders_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/home.rb, line 7</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">pending_orders</span>
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">orders</span>.<span class="ruby-identifier">by_week</span>.<span class="ruby-identifier">pending</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-unfinished_orders">
            
              <b>unfinished_orders</b>()
            
            <a href="../classes/Home.html#method-i-unfinished_orders" name="method-i-unfinished_orders" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-unfinished_orders_source')" id="l_method-i-unfinished_orders_source">show</a>
                
              </p>
              <div id="method-i-unfinished_orders_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/home.rb, line 15</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">unfinished_orders</span>
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">orders</span>.<span class="ruby-identifier">by_week</span>.<span class="ruby-identifier">unfinished</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>
